﻿
CREATE procedure [dbo].[FC_Period_Search]
as
begin
	select 0 as IdPeriod, 0 as IdEntityF, '' as Period, CONVERT(date,getdate()) as DateClose
	union all
	
	select top 12 IdPeriod, IdEntityF, substring(convert(varchar(7),Period),1,4)+'-'+substring(convert(varchar(7),Period),5,2) as Period, DateClose 
	from FC_Period 
	where DateClose > DATEADD(MONTH, 2, GETDATE()) order by IdPeriod
end